package com.zuikaku.nettychat.dao;

import com.zuikaku.nettychat.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User getUserByPhone(@Param("phone") String phone);

    User getUserByPhoneAndPassword(@Param("phone") String phone,@Param("password") String password);

    List<User> queryUserByNick(@Param("nick") String nick);
}